package com.google.android.gms.games.snapshot;

import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.drive.Contents;
import com.google.android.gms.internal.hk;

public final class SnapshotEntity implements SafeParcelable, Snapshot {
    public static final SnapshotEntityCreator CREATOR = new SnapshotEntityCreator();
    private static final Object Ue = new Object();
    private Contents HG;
    private final SnapshotMetadataEntity Uf;
    private final int xM;

    SnapshotEntity(int versionCode, SnapshotMetadata metadata, Contents contents) {
        this.xM = versionCode;
        this.Uf = new SnapshotMetadataEntity(metadata);
        this.HG = contents;
    }

    static boolean a(Snapshot snapshot, Object obj) {
        if (!(obj instanceof Snapshot)) {
            return false;
        }
        if (snapshot == obj) {
            return true;
        }
        Snapshot snapshot2 = (Snapshot) obj;
        return hk.equal(snapshot2.getMetadata(), snapshot.getMetadata()) && hk.equal(snapshot2.getContents(), snapshot.getContents());
    }

    static int b(Snapshot snapshot) {
        return hk.hashCode(snapshot.getMetadata(), snapshot.getContents());
    }

    static String c(Snapshot snapshot) {
        return hk.e(snapshot).a("Metadata", snapshot.getMetadata()).a("HasContents", Boolean.valueOf(snapshot.getContents() != null)).toString();
    }

    public int describeContents() {
        return 0;
    }

    public boolean equals(Object obj) {
        return a(this, obj);
    }

    public Snapshot freeze() {
        return this;
    }

    public Contents getContents() {
        return this.HG;
    }

    public SnapshotMetadata getMetadata() {
        return this.Uf;
    }

    public int getVersionCode() {
        return this.xM;
    }

    public int hashCode() {
        return b(this);
    }

    public String toString() {
        return c(this);
    }

    public void writeToParcel(Parcel out, int flags) {
        SnapshotEntityCreator.a(this, out, flags);
    }
}
